xen/arm: Rework the interface of p2m_cache_flush and use typesafe gfn
authorJulien Grall <julien.grall@arm.com>
Fri, 10 Jun 2016 17:48:02 +0000 (18:48 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 13 Jul 2016 13:08:46 +0000 (14:08 +0100)
commitcf180bf8af20dd01fefbd492d1b3e342a379b93e
tree97efaf2fac796d8a9e6ba76a61e0a40395f5b600
parentc2b02d8aa89d69dd1cf54e32a407599e96e6316e
xen/arm: Rework the interface of p2m_cache_flush and use typesafe gfn

p2m_cache_flush is expecting GFNs in parameter and not MFNs. Rename
the variable to *gfn* and use typesafe to avoid possible misusage.

Also, modify the prototype of the function to describe the range
using the start and the number of GFNs. This will avoid to wonder
whether the end if inclusive or exclusive.

Note that the type of the parameters 'start' is changed from xen_pfn_t
(aka uint64_t) to gfn_t (aka unsigned long). This means that a truncation
will occur for ARM32. It is fine because it will always be encoded on 28
bits maximum (40 bits address).

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domctl.c
xen/arch/arm/p2m.c
xen/include/asm-arm/p2m.h